﻿var React = require('react');

var Pay = React.createClass({
    propTypes: {
        initialData:  React.PropTypes.array
    },
    componentDidMount: function () {
        $("#submitbnt").click(function () {
          
            window.location.href = '../Charge/JsApi?czxk=' + $("#czxk").val() + '&&Dycardno=' + $("#Dycardno").val();
            //$(this).hide();
        });
        return { data: [] };
    },
    render: function() {
        return (
            <div id="pay" class="pad3">
              
<div className="container-fluid">
<div className="row">
  <div className="col-xs-5">
    <p className="htitle">充值金额：</p>
  </div>
  <div className="col-xs-7"><p className="payrow">充{this.props.selectzinfoc.czxk},抵{this.props.selectzinfoc.czzsz}</p></div>
</div>
<div className="row">
<div className="col-xs-12">
   <p className="htitle">付款方式：</p>
</div>
</div>
<div className="row">
<div className="col-xs-12">
  <button type="submit" 　id="submitbnt" className="btn btn-default active btn-lg btn-block">微信支付</button>
</div>
</div>
</div>
<div className="charge"><p className="ltitle">充值/消费记录</p></div>
  <div>
  <table className="table table-bordered">
  <thead>
        <tr className="payheader">
          <th>日期</th>
          <th>类型</th>
          <th>金额</th>
          <th>余额</th>
        </tr>
  </thead>
     
      {this.props.initialData.map(function (result) {
          return
          (
         <div>
          <tr>
  <td>{result.BDate}</td>
  <td>{result.type}</td>
  <td>{result.Amount}</td>
  <td>{result.Accaddbalance}</td>
          </tr>
          </div>
          )
      })}
  </table>
  </div>
            </div>
 );
}
});

module.exports = Pay;